home *** CD-ROM | disk | FTP | other *** search
Text File | 1989-10-04 | 1.0 KB | 29 lines | [TEXT/GEOL] |
- Item 7836064 4-Oct-89 12:23
-
- From: BIANCHI1 Bianchi, Curt
-
- To: D4132 Farallon, R & D,PRT
-
- cc: MACAPP.TECH$ MACAPP Tech
-
- Sub: Re: View initialization
-
- Hi Joe,
-
- You could do this in two steps by converting the view coordinates to window
- coordinates, and then converting the window coordinates to global coordinates.
- This is done by calling the view's LocalToWindow method, then calling the
- window's GetGlobalBounds method, which returns the window's global location in
- the topLeft point of its parameter, and then adding the result of LocalToWindow
- to the topLeft of the rect returned by GetGlobalBounds. Neither of these
- methods requires focusing. Something like this ought to work:
-
- aView.LocalToWindow(aVPoint);
- aWindow.GetGlobalBounds(windowBounds);
- globalViewLocation.h := aVPoint.h + windowBounds.left;
- globalViewLocation.v := aVPoint.v + windowBounds.top;
-
- Curt Bianchi
- Apple Computer
-
-